﻿using System.Linq;

namespace Coder.Workflow
{
    public class WorkflowInfoQueryExtenter<TWorkPrcess, TProcessInstance>
        where TWorkPrcess : WorkProcess
        where TProcessInstance : ProcessInstance
    {
        public virtual IQueryable<WorkActivity> FillQuery(IQueryable<WorkActivity> workActivities)
        {
            return workActivities;
        }

        public virtual IQueryable<TWorkPrcess> CreateWorkProcess(WorkflowDbContext context)
        {
            return context.Set<TWorkPrcess>();
        }

        public virtual IQueryable<TProcessInstance> CreateProcessInstances(WorkflowDbContext context)
        {
            return context.Set<TProcessInstance>();
        }
    }
}